using System.IO;
using System.Text;

namespace BizTalk.BuildGenerator.FileBuilders
{
    public class FileHelper
    {
        /// <summary>
        /// Writes the text to a file
        /// </summary>
        /// <param name="path"></param>
        /// <param name="sb"></param>
        public static void WriteFile(string path, StringBuilder sb)
        {
            using (FileStream fs = new FileStream(path, FileMode.Create, FileAccess.Write))
            {
                StreamWriter writer = new StreamWriter(fs);
                writer.Write(sb.ToString());
                writer.Flush();
                fs.Close();
            }
        }
    }
}